/** RunLog-light
 * Log your runs - A simple program for runners
 *  
 * @author M. Mueller
 * @version 15.01.10  
 */

package runlog;

/**
 *	Saves Trainings.
 */
public class CTraining {
	/** 
	 * 	
	 */	
	private String date;
	/** 
	 * 	
	 */	
	private float distance;
	/** 
	 * 	
	 */	
	private String time;
	/** 
	 * 	
	 */	
	private int hours;
	/** 
	 * 	
	 */	
	private int minutes;
	/** 
	 * 	
	 */	
	private int seconds;
	/** 
	 * 	
	 */	
	private String route;
	/** 
	 * 	
	 */	
	private String comment;

	/**
	 * Constructor specifying training.
	 * @param date1 Date
	 * @param distance1 Distance
	 * @param hours1 Hours
	 * @param minutes1 Minutes
	 * @param seconds1 Seconds
	 * @param route1 Route description
	 * @param comment1 Comments
	 */
	public CTraining(final String date1, final float distance1,
						final int hours1, final int minutes1,
						final int seconds1, final String route1,
						final String comment1) {
		this.setDate(date1);
		this.setDistance(distance1);
		this.setHours(hours1);
		this.setMinutes(minutes1);
		this.setSeconds(seconds1);
		this.setRoute(route1);
		this.setComment(comment1);
		this.setTime(hours1, minutes1, seconds1);
	}

	/**
	 * @param date1 The date to set.
	 */
	public final void setDate(final String date1) {
		this.date = date1;
	}

	/**
	 * @return The date.
	 */
	public final String getDate() {
		return date;
	}

	/**
	 * @param distance1 The distance to set
	 */
	public final void setDistance(final float distance1) {
		this.distance = distance1;
	}

	/**
	 * @return The distance
	 */
	public final float getDistance() {
		return distance;
	}

	/**
	 * Running time to set.
	 * @param hours1 Hours to set
	 * @param minutes1 Minutes to set
	 * @param seconds1 Seconds to set
	 */
	public final void setTime(final int hours1, final int minutes1, 
									final int seconds1) {
		this.time = Integer.toString(hours1) + ":"
					+ Integer.toString(minutes1) + ":"
					+ Integer.toString(seconds1);
	}

	/**
	 * @return The time
	 */
	public final String getTime() {
		return time;
	}

	/**
	 * @param hours1 The hours to set
	 */
	public final void setHours(final int hours1) {
		this.hours = hours1;
	}

	/**
	 * @return The hours
	 */
	public final int getHours() {
		return hours;
	}

	/**
	 * @param minutes1 The minutes to set
	 */
	public final void setMinutes(final int minutes1) {
		this.minutes = minutes1;
	}

	/**
	 * @return The minutes
	 */
	public final int getMinutes() {
		return minutes;
	}

	/**
	 * @param seconds1 The seconds to set
	 */
	public final void setSeconds(final int seconds1) {
		this.seconds = seconds1;
	}

	/**
	 * @return The seconds
	 */
	public final int getSeconds() {
		return seconds;
	}

	/**
	 * @param route1 The route description to set
	 */
	public final void setRoute(final String route1) {
		this.route = route1;
	}

	/**
	 * @return The route
	 */
	public final String getRoute() {
		return route;
	}

	/**
	 * @param comment1 The comments to set
	 */
	public final void setComment(final String comment1) {
		this.comment = comment1;
	}

	/**
	 * @return The comments
	 */
	public final String getComment() {
		return comment;
	}
}
